package laboratoryQ.experiment.process;

import laboratoryQ.experiment.settings.IExperimentSettings;
import laboratoryQ.computation.IRandom;

public abstract class BaseExperimentContext implements IExperimentContext {
	private IExperimentSettings settings;
	private IRandom random;

	public BaseExperimentContext(IExperimentSettings settings) {
		this.settings = settings;
		if (settings != null) {
			this.random = settings.getRandomFactory().newRandom();
		}
	}

	@Override
	public IExperimentSettings getExperimentSettings() {
		return settings;
	}

	@Override
	public IRandom getRandom() {
		return random;
	}
}
